Version Control using Git and GitHub

1. Create Repository

A repository stores project files and tracks changes.

git init

2. Commit Changes

Commit saves the changes to the repository.

git commit -m "First Commit"

3. Push to GitHub

Push uploads local files to GitHub repository.

git push origin main

4. Pull from GitHub

Pull downloads the latest updates from GitHub.

git pull origin main

5. Create Branch

Branches allow developers to work on new features.

git branch feature1

6. Merge Branch

Merge combines branch changes into the main branch.

git merge feature1